package com.foreknow.demo6;

public class Officier extends Employee{
    double vehicleAllawance;
    public double getVehicleAllawance(){
        return this.vehicleAllawance;
    }
    @Override
    public void getDetail(){
        System.out.println(vehicleAllawance);
        System.out.println("name = " + this.name+ "\tbirth:"+this.birth+"\tsalary:"+(this.salary+this.vehicleAllawance));
        super.getDetail();
    }

    public static void main(String[] args) {
        Officier o = new Officier();
        o.name = "o1";
        o.birth = "2010-2-12";
        o.salary = 10000;
        o.vehicleAllawance = 5000;
        o.getDetail();
        o.getVehicleAllawance();
    }
}
